tests: constify tests
authorØyvind Kolås <pippin@gimp.org>
Sun, 18 Mar 2012 16:57:04 +0000 (16:57 +0000)
committerØyvind Kolås <pippin@gimp.org>
Sun, 18 Mar 2012 16:57:04 +0000 (16:57 +0000)
tests/concurrency-stress-test.c
tests/extract.c
tests/grayscale_to_rgb.c
tests/n_components.c
tests/palette.c
tests/rgb_to_bgr.c
tests/rgb_to_ycbcr.c

index 20d31b41c36d9ab72f69290d732fe1ff68befeb1..7832c23a4dfa4204b23b1ae3066ce3afb8f5ff4c 100644 (file)
@@ -39,7 +39,7 @@ babl_fish_path_stress_test_thread_func (void *not_used)
       /* Try to get a fish with an as complex conversion path as
        * possible
        */
-      Babl *fish = babl_fish ("R'G'B'A u16", "YA double");
+      const Babl *fish = babl_fish ("R'G'B'A u16", "YA double");
 
       /* Just do something random with the fish */
       babl_get_name (fish);
index db52f3d9def1e6cdae7a28a47f0c6fc284515fc4..6f6e92711b2b384b49f7ce584e1534474699a7ba 100644 (file)
@@ -25,7 +25,7 @@
 
 #define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \
   {       \
-  Babl *fish;       \
+  const Babl *fish;       \
   int i;       \
   fish = babl_fish (src_fmt, dst_fmt);       \
   if (!fish)       \
index 8e004b9307cbaf98bb2c6ea880d6c80b491ed93c..6658f7fcce4aae347144f2fa00aa3526b7f7786b 100644 (file)
@@ -31,7 +31,7 @@ float rgb_buf     [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;
 
index 0cfeb1163c9e01721f0ad85ed6500b97029b2b0e..0d62e7d5fb1e31e48184b2a477ac4ac3730ecd7f 100644 (file)
@@ -77,9 +77,9 @@ test (void)
 
   for (components = 1; components < 2048; components ++)
   {
-    Babl *fish;
-    Babl *src_fmt;
-    Babl *dst_fmt;
+    const Babl *fish;
+    const Babl *src_fmt;
+    const Babl *dst_fmt;
     int   i;
 
     src_fmt = babl_format_n (babl_type ("float"), components);
index 25a6033ea3db63a3fb1fb4c40455afce9a6bb327..6ad517f682b656a56f4da645be2dd99beca60513 100644 (file)
@@ -25,7 +25,7 @@
 
 #define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \
   {       \
-  Babl *fish;       \
+  const Babl *fish;       \
   int i;       \
   fish = babl_fish (src_fmt, dst_fmt);       \
   if (!fish)       \
@@ -58,7 +58,7 @@ main (int    argc,
   if(1){
     unsigned char in[][1]   = {{        0},{          1},{          2},{15}};
     unsigned char out[][4]  = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}};
-    Babl *palA;// = babl_new_palette (NULL, 0);
+    const Babl *palA;// = babl_new_palette (NULL, 0);
     //Babl *palB = babl_new_palette (NULL, 0);
     //
     babl_new_palette (NULL, &palA, NULL);
@@ -71,7 +71,7 @@ main (int    argc,
   if(0){
     unsigned char in[][2]   = {{    0,255},{      1,255},{      2,255},{15,200}};
     unsigned char out[][4]  = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}};
-    Babl *palA;// = babl_new_palette (NULL, 0);
+    const Babl *palA;// = babl_new_palette (NULL, 0);
     //Babl *palB = babl_new_palette (NULL, 0);
     //
     babl_new_palette (NULL, NULL, &palA);
index 51986ee6a53f65c80e0d6bf6e0ac877f5036c19b..60fee1f24c590c880ceefc58f65f53fa90c14377 100644 (file)
@@ -39,7 +39,7 @@ unsigned char destination_buf [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;
 
index 6efc79620a3e9e844251a8a3313ce810b409e994..49ddee37a77e6c6d54044fe5ec6cbeb599d78154 100644 (file)
@@ -46,7 +46,7 @@ float destination_buf [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;